from page.base_page import BasePage
from appium.webdriver.common.mobileby import By

class SpPage(BasePage):
    #定位器
    sp_locator = (By.XPATH,
                  '//android.widget.ListView[@resource-id=\"com.gfeng.daydaycook:id/rightListView\"]/android.widget.LinearLayout[1]/android.widget.GridView[1]/android.widget.RelativeLayout[1]')
    #操作方法
    #点击食品
    def click_sp(self):
        self.driver.find_element(*self.sp_locator).click()